<template>
	<div>
		<div class="header">
			<div class="login_header">
				<a href="index.html"><img src="../static/images/logo.png" alt=""></a>
				<span>欢迎登陆</span>
			</div>
		</div>
		<div class="login_content">
			<div class="login_wrapper">
				<img class="login_media" src="../static/images/login_photo.png" alt="">
				<div class="login_box">
					<p>还没有账号？
						<a style="color:#00b8ee" href="register.html">立即注册></a>
					</p>
					<img class="login_img" src="../static/images/login_img.png" alt="">
					<div class="input_group">
						<label for="user"><img src="../static/images/icon_user.jpg" alt=""></label>
						<input v-model="username" type="text" id="user" placeholder="已验证手机/用户名">
					</div>
					<div class="input_group">
						<label for="password"><img src="../static/images/icon_pwd.png" alt=""></label>
						<input v-model="password" type="password" id="uspassworder" placeholder="密码">
					</div>
					<div class="forget_group" style="font-size: 12px">
						<!--<input type="checkbox"><span></span>自动登陆-->
						<!--<a href="retrieve_password.html" class="forget_pwd">忘记密码？</a>-->
					</div>
					<button @click="loginBtn" class="login">立即登陆</button>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		created() {

		},
		data() {
			return {
				username: '',
				password: ''
			}
		},
		methods: {
			loginBtn: function() {
				var self = this
				this.$api.get('public/index.php/api/account/login_pwd/', {
					username: self.username,
					password: self.password
				}, r => {
					console.log('登录r', r)
					if(r.code === 200){
						self.$message(r.msg)
					}else{
						self.$message(r.msg)
					}
				})
			}
		}
	}
</script>

<style>

</style>